<template>
    <div class="Manage-container">
        <div class="manage-function">
            <div class="od" :class="{check: checkNum1}" @click="checks(1)">文件管理</div>
            <div class="od" :class="{check: checkNum2}" @click="checks(2)">数据管理</div>
            <div class="od" :class="{check: checkNum3}" @click="checks(3)">音乐管理</div>
            <div class="od" :class="{check: checkNum4}" @click="checks(4)">电影影评</div>
        </div>
        <div class="function-container">
            <div class="file-manage" :class="{ishow: !checkNum1}">
                <file-system></file-system>
            </div>
            <div class="comment-manage" :class="{ishow: !checkNum2}">
                <DataBaseManage></DataBaseManage>
            </div>
            <div class="music-manage" :class="{ishow: !checkNum3}">音乐管理</div>
            <div class="music-manage" :class="{ishow: !checkNum4}">
                <CreateMovieNote></CreateMovieNote>
            </div>
        </div>
    </div>
</template>

<script>
import FileSystem from '../components/file-system.vue'
import CreateMovieNote from '../components/movie/CreateMovieNote.vue'
import DataBaseManage from "@/components/databaseManage/DataBaseManage.vue"
export default {
    components: { FileSystem, CreateMovieNote, DataBaseManage },
    data() {
        return {
            checkNum: 1,
        }
    },
    computed: {
        checkNum1() {
            return this.checkNum===1; 
        },
        checkNum2() {
            return this.checkNum===2;
        },
        checkNum3() {
            return this.checkNum===3;
        },
        checkNum4() {
            return this.checkNum===4;
        }
    },
    methods: {
        checks(index) {
            this.checkNum = index
        }
    },
}
</script>

<style lang="less" scoped>
    .Manage-container {
        display: flex;
        // justify-content: center;
        .manage-function {
            margin-left: 100px;
            width: 120px;
            height: 500px;
            padding-left: 10px;
            border-radius: 5px;
            background: rgba(99, 110, 114,0.3);
            .od {
                margin-top: 20px;
                padding-left: 10px;
                font-size: 24px;
                font-family: 'kaiti';
                background: rgb(231, 110, 110);
            }
            .od:hover {
                cursor: pointer;
                background: rgba(0, 206, 201,1.0);
                transform: scale(1.1);
            }
            .check {
                background: rgba(0, 206, 201,1.0);
            }
        }
        .function-container {
            position: relative;
            min-height: 500px;
            width: 1000px;
            // background: #000;
            .ishow {
                display: none;
            }
            .file-manage {

            }
            .comment-manage {

            }
            .music-manage {

            }
        }

    }
</style>